package com.JavaWk;

public class Book {
    private long book_ID = 0;
    private String book_Name, book_Author;
    private double book_price;
    private static long id;


    static
    {
        id = 0;
    }

    {
        this.id ++ ;
        this.book_ID = this.id;
    }

    public Book(){}
    public Book(String name, String author){
        this.book_Name = name;
        this.book_Author = author;
    }
    public Book(String name, String author, double price){
        this.book_Author = author;
        this.book_Name = name;
        this.book_price = price;
    }

    public String getBook_Author() {
        return book_Author;
    }

    public void setBook_Author(String book_Author) {
        this.book_Author = book_Author;
    }

    public String getBook_Name() {
        return book_Name;
    }

    public void setBook_Name(String book_Name) {
        this.book_Name = book_Name;
    }

    public double getBook_price() {
        return book_price;
    }

    public void setBook_price(double book_price) {
        this.book_price = book_price;
    }

    public long getBook_ID() {
        return book_ID;
    }

    public String to_String(){
        return "bookID:" + book_ID + " bookName:" + book_Name + " bookAuthor:" + book_Author + " bookPrice:" + book_price;
    }
}
